package com.smartfast4j.backend.modules.sys.entity;

import java.io.Serializable;

import com.baomidou.mybatisplus.enums.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;

/**
 * <p>
 * 系统日志
 * </p>
 *
 * @author 孤傲苍狼
 * @since 2017-09-05
 */
@TableName("sys_log")
public class SysLog extends Model<SysLog> {

    private static final long serialVersionUID = 1L;

	@TableId(value="id", type= IdType.AUTO)
	private Long id;
    /**
     * 用户名
     */
	private String username;
    /**
     * 用户操作
     */
	private String operation;
    /**
     * 请求方法
     */
	private String method;
    /**
     * 请求参数
     */
	private String params;
    /**
     * 执行时长(毫秒)
     */
	private Long time;
    /**
     * IP地址
     */
	private String ip;
    /**
     * 创建时间
     */
	@TableField("create_date")
	private Date createDate;


	public Long getId() {
		return id;
	}

	public SysLog setId(Long id) {
		this.id = id;
		return this;
	}

	public String getUsername() {
		return username;
	}

	public SysLog setUsername(String username) {
		this.username = username;
		return this;
	}

	public String getOperation() {
		return operation;
	}

	public SysLog setOperation(String operation) {
		this.operation = operation;
		return this;
	}

	public String getMethod() {
		return method;
	}

	public SysLog setMethod(String method) {
		this.method = method;
		return this;
	}

	public String getParams() {
		return params;
	}

	public SysLog setParams(String params) {
		this.params = params;
		return this;
	}

	public Long getTime() {
		return time;
	}

	public SysLog setTime(Long time) {
		this.time = time;
		return this;
	}

	public String getIp() {
		return ip;
	}

	public SysLog setIp(String ip) {
		this.ip = ip;
		return this;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public SysLog setCreateDate(Date createDate) {
		this.createDate = createDate;
		return this;
	}

	public static final String ID = "id";

	public static final String USERNAME = "username";

	public static final String OPERATION = "operation";

	public static final String METHOD = "method";

	public static final String PARAMS = "params";

	public static final String TIME = "time";

	public static final String IP = "ip";

	public static final String CREATE_DATE = "create_date";

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	@Override
	public String toString() {
		return "SysLog{" +
			"id=" + id +
			", username=" + username +
			", operation=" + operation +
			", method=" + method +
			", params=" + params +
			", time=" + time +
			", ip=" + ip +
			", createDate=" + createDate +
			"}";
	}
}
